package com.csmarket.csmarketbackend.mapper;

import com.csmarket.csmarketbackend.pojo.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select( "select * from users where username=#{username}" )
    Users getUserByName(String username);

    @Insert("insert into users(username, password, role) values(#{username}, #{password}, #{role})")
    void insertUser(Users user);
}